package com.lcm.basic.p6.enums;

/**
* @author Coder-lcm
* @date 2021/3/31
*/
public enum SeasonEnum implements SeasonDesc{
    SPRING("春天"),SUMMER("夏天"),FALL("秋天"),WINTER("冬天");


    private final String season;

    /**
     * 枚举类的构造器访问修饰符默认是private，且只能是private
     * @param season
     */
    private SeasonEnum(String season){
        this.season = season;
    }

    public String getSeason(){
        return this.season;
    }

    @Override
    public void info() {
        switch (this) {
            case SPRING:
                System.out.println("当前是春天");break;
            case SUMMER:
                System.out.println("当前是夏天");break;
            case FALL:
                System.out.println("当前是夏天");break;
            case WINTER:
                System.out.println("当前是夏天");break;
            default: break;
        }
    }

}
